// $Id: loggercountbandwidthutilization.h 63 2004-10-22 14:33:20Z jonas $
#ifndef LOGGERCOUNTBANDWIDTHUTILIZATION_H
#define LOGGERCOUNTBANDWIDTHUTILIZATION_H

#include "loggercount.h"
#include "node.h"
#include <map>

/**
 * This is a logger which measures the avreage bandwith utilization of nodes.
 */
class LoggerCountBandwidthUtilization : public LoggerCount {
public:
	LoggerCountBandwidthUtilization();
	//~LoggerCountBandwidthUtilization();

	void eos_simulate_start(void *);
	void eos_simulate_stop(void *);
	void network_transfer(void *, void *, unsigned int);
	void clock_tick(unsigned int);

private:
	void resetBandwidths();

	std::map<Node *, unsigned int> m_uploadBandwidths;
	std::map<Node *, unsigned int> m_downloadBandwidths;

	Eos *m_eos;
	std::fstream m_fout;
};

#endif
